package com.itheima.core;


import com.itheima.core.domain.Configuration;
import com.itheima.core.inter.SqlSession;
import com.itheima.core.inter.SqlSessionFactory;

/**
 * @author slstart
 * @create 2021-05-04 13:59
 */
public class DefaultSqlSessionFactory implements SqlSessionFactory {
    private Configuration cfg;

    public DefaultSqlSessionFactory(Configuration cfg) {
        this.cfg = cfg;
    }

    public SqlSession openSession() {

        return new DefaultSqlSession(cfg);
    }
}
